// import { useCountDown } from "ahooks";
import React, { useRef, useState, useEffect } from "react";
import useCountDown from "../../hooks/customs/useCountDown";

const TestUseCountDown = () => {
  const [countdown, formattedRes] = useCountDown({
    // targetDate: `${new Date().getFullYear()}-12-31 23:59:59`,
    leftTime: 60000
  })

  const { days, hours, minutes, seconds, milliseconds } = formattedRes
  return (
    <p>
      <div>{countdown}</div>
      距离今年年底还剩 {days} 天 {hours} 小时 {minutes} 分钟 {seconds} 秒 {milliseconds} 毫秒
    </p>
  );
}

export default TestUseCountDown
